package src.main.java.org.reflect.obtainClassObject;
/*
* 获取class对象的三种方式
* */
public class TestClass {
    public static void main(String[] args) throws ClassNotFoundException {
        Class studentClass = Student.class;
        System.out.println(studentClass.getName()); //全类名
        System.out.println(studentClass.getSimpleName());//简名

        Class aClass = Class.forName("src.main.java.org.reflect.obtainClassObject.Student");
        System.out.println(aClass.getName());

        Student s1 = new Student();
        Class c3 = s1.getClass();
        System.out.println(c3.getName());
    }
}
